import Layout from '@/layout'

const forumRouter = {
  path: '/forum',
  component: Layout,
  redirect: '/forum/topic',
  name: 'Forum',
  meta: {
    title: '论坛管理',
    icon: 'documentation'
  },
  hidden: true,
  children: [
    {
      path: 'topic',
      component: () => import('@/views/forum/topic/index'),
      name: 'Topic',
      meta: { title: '论坛管理', icon: 'list' }
    },
    {
      path: 'topic/detail/:id',
      component: () => import('@/views/forum/topic/detail'),
      name: 'TopicDetail',
      meta: { title: '论坛主题详情', noCache: true, activeMenu: '/forum/topic' },
      hidden: true
    },
    {
      path: 'topic/edit/:id(\\d+)',
      component: () => import('@/views/forum/topic/edit'),
      name: 'TopicEdit',
      meta: { title: '编辑论坛主题', noCache: true, activeMenu: '/forum/topic' },
      hidden: true
    },
    {
      path: 'topic/add',
      component: () => import('@/views/forum/topic/edit'),
      name: 'TopicAdd',
      meta: { title: '新增论坛主题', noCache: true, activeMenu: '/forum/topic' },
      hidden: true
    },
    {
      path: 'topicLabel',
      component: () => import('@/views/forum/topiclabel/index'),
      name: 'TopicLabel',
      meta: { title: '论坛标签管理', icon: 'list' }
    },
    {
      path: 'blackuser',
      component: () => import('@/views/forum/blackuser/index'),
      name: 'Blackuser',
      meta: { title: '论坛小黑屋管理', icon: 'list' }
    },
    {
      path: 'blackuser/detail/:id',
      component: () => import('@/views/forum/blackuser/detail'),
      name: 'BlackuserDetail',
      meta: { title: '论坛小黑屋详情', noCache: true, activeMenu: '/forum/blackuser' },
      hidden: true
    },
  ]
}

export default forumRouter